package de.hub.sar.itsec.sslfetcher.clr;

public abstract class Argument<T> {
	private static final String NO_HELP = "NO DESCRIPTION";
	
	private final String id;
	private final String help;
	private final T defaultValue;
	T value;
	
	public Argument(final String id, final T defaultValue, 
			final String helpMsg) {
		this.id = id;
		this.defaultValue = defaultValue;
		this.help = helpMsg;
	}
	
	String getId() {
		return this.id;
	}
	
	public T getValue() {
		return this.value == null ? this.defaultValue : this.value;
	}

	public String getHelp() {
		return this.help == null ? NO_HELP : this.help;
	}

	abstract void setValue(String value);
}
